import { request } from '@boeyo/portal';
import { AxiosRequestConfig } from 'axios';

/**
 * 查询告警方式配置信息 查询告警方式配置信息
 */
export const getAlarmModeConfigInfo = (params) => {
  return request({
    url: 'alarmModeConfig/selectInfo',
    method: 'GET',
    params,
  });
};

/**
 * 修改告警方式配置信息
 */
export const updateAlarmModeConfigInfo = (data: any) => {
  return request({
    url: '/alarmModeConfig/update',
    method: 'PUT',
    data,
  });
};

/**
 * 告警方式下拉列表 告警方式下拉列表
 */
export const getalarmModeSelectList = (params) => {
  return request({
    url: 'alarmModeConfig/selectList',
    method: 'GET',
    params,
  });
};
export const addAlarmNotice = async (params) => {
  return {
    rows: [],
    code: 200,
    message: '新增成功',
  };
};
export const updateAlarmNotice = async (params) => {
  return {
    rows: [],
    code: 200,
    message: '更新成功',
  };
};
// 上传音频
export const uploadAudio = async () => {
  return {
    rows: [],
    data: {
      url: '111',
    },
  };
};

/**
 * 图片上传
 */
export const uploadImage = (data: any) => {
  return request({
    url: '/common/upload',
    method: 'POST',
    data,
  });
};

/**
 * 角色组列表
 */
export const fetchRoleGroup = (params?: any) => {
  return request({
    url: 'roleGroup/list',
    params,
  });
};
